package com.ihg.hiex.admin.dao.session;

import java.util.List;

import com.demo2do.core.persistence.annotation.Dao;
import com.demo2do.core.persistence.annotation.Query;
import com.demo2do.core.persistence.annotation.Variable;
import com.ihg.hiex.entity.session.Session;
import com.ihg.hiex.entity.user.Delegate;
import com.ihg.hiex.entity.user.DelegateCoachingConversation;

/**
 * 
 * @author dan
 *
 */
@Dao("hibernate")
public interface DelegateCoachingConversationDao {
    
    /**
     * 
     * @param session
     * @return
     */
    @Query("FROM DelegateCoachingConversation WHERE disabled = false AND session = :session")
    public List<DelegateCoachingConversation> list(@Variable("session") Session session);
    
    /**
     * 
     * @param delegates
     * @return
     */
    @Query("FROM DelegateCoachingConversation WHERE disabled = false AND delegate in (:delegates)")
    public List<DelegateCoachingConversation> list(@Variable("delegates") List<Delegate> delegates);
    
    /**
     * 
     * @param delegate
     * @return
     */
    @Query("FROM DelegateCoachingConversation WHERE disabled = false AND delegate = :delegate")
    public List<DelegateCoachingConversation> list(@Variable("delegate") Delegate delegate);

}
